package com.tech.connect.zhaorencai.zhuanwaikuai;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.ksy.common.dialog.BaseDialog;
import com.ksy.common.dialog.DateDialog;
import com.tech.connect.R;
import com.tech.connect.activity.BaseActivity;

public class PublishBiaoActivity extends BaseActivity implements View.OnClickListener {

    private TextView tvTitle;
    private TextView tvCompany;
    private TextView tvAddress;
    private TextView tvPoint;
    private TextView tvStartDate;
    private TextView tvEndDate;
    private TextView tvMoney;
    private TextView tvName;
    private TextView tvPhone;
    private Button btNext;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getHeadBar().setTitle("发布任务");
        setContentView(R.layout.activity_publish_biao);
        initView();
        loadData();
    }

    private void initView() {
        tvTitle = findViewById(R.id.tvTitle);
        tvCompany = findViewById(R.id.tvCompany);
        tvAddress = findViewById(R.id.tvAddress);
        tvPoint = findViewById(R.id.tvPoint);
        tvStartDate = findViewById(R.id.tvStartDate);
        tvEndDate = findViewById(R.id.tvEndDate);
        tvMoney = findViewById(R.id.tvMoney);
        tvName = findViewById(R.id.tvName);
        tvPhone = findViewById(R.id.tvPhone);
        btNext = findViewById(R.id.btNext);
        tvTitle.setOnClickListener(this);
        tvCompany.setOnClickListener(this);
        tvAddress.setOnClickListener(this);
        tvPoint.setOnClickListener(this);
        tvStartDate.setOnClickListener(this);
        tvEndDate.setOnClickListener(this);
        tvMoney.setOnClickListener(this);
        tvName.setOnClickListener(this);
        tvPhone.setOnClickListener(this);
        btNext.setOnClickListener(this);
    }

    private void loadData() {

    }

    @Override
    public void onClick(View v) {
        if (v == tvTitle) {

        } else if (v == tvCompany) {

        } else if (v == tvAddress) {

        } else if (v == tvPoint) {

        } else if (v == tvStartDate) {
            final DateDialog dateDialog = new DateDialog(activity);
            dateDialog.setOnClickListener(new DateDialog.ClickListener() {
                @Override
                public void cancel(BaseDialog dialog) {
                    dateDialog.dismiss();
                }

                @Override
                public void enter(BaseDialog dialog, DateDialog.Year y, DateDialog.Month m, DateDialog.Day d) {
                    dateDialog.dismiss();
                }
            });
            dateDialog.show();
        } else if (v == tvEndDate) {

        } else if (v == tvMoney) {

        } else if (v == tvName) {

        } else if (v == tvPhone) {

        } else if (v == btNext) {

        }
    }
}